<template>
  <div></div>
</template>

<script>
import CryptoJS from "crypto-js";
import axios from "axios";
export default {
  props: {},
  data() {
    return {
      // strKey: "abcdefghijklmn12",
      strKey: "26567E43738a8F91)E4E34e8D6E1E28A",
      // strIV: "abcdefghijklmn12",
      strIV: "3d03AD3F-2Ac26A2",
      strOriginalText: "https://ouheshuju.com/dist/index.html#/index",
      strCiphertext: "",
      token: ""
    };
  },
  computed: {},
  created() {
    this.token = localStorage.getItem("token");
    console.log(this.token);
  },
  mounted() {
    // var VConsole = require("vconsole");
    // vConsole = new VConsole();
    this.$router.push("/index");
  },
  watch: {},
  methods: {
    // jiami() {
    //   var key = CryptoJS.enc.Utf8.parse(this.strKey);
    //   var iv = CryptoJS.enc.Utf8.parse(this.strIV);
    //   var encrypted = CryptoJS.AES.encrypt(this.strOriginalText, key, {
    //     iv: iv,
    //     mode: CryptoJS.mode.CBC,
    //     padding: CryptoJS.pad.Pkcs7
    //   });
    //   this.strCiphertext = encrypted.ciphertext.toString(); //密文
    //   console.log(this.strCiphertext);
    // },
    // 解密函數
    // jiemi(strCiphertext) {
    //   var key = CryptoJS.enc.Utf8.parse(this.strKey);
    //   var iv = CryptoJS.enc.Utf8.parse(this.strIV);
    //   var strHex = CryptoJS.enc.Hex.parse(this.strCiphertext);
    //   var strBase64 = CryptoJS.enc.Base64.stringify(strHex);
    //   var decrypted = CryptoJS.AES.decrypt(strBase64, key, {
    //     iv: iv,
    //     mode: CryptoJS.mode.CBC,
    //     padding: CryptoJS.pad.Pkcs7
    //   });
    //   this.strOriginalText = decrypted.toString(CryptoJS.enc.Utf8); //原文
    //   console.log(this.strOriginalText);
    // }
  }
};
</script>

<style scoped lang="scss">
</style>
